package CSC8002;

import java.util.*;

public final class LicenceNumber {

	private final Name name;
	private final Calendar date;
	private final int serialNumber;
	
	public LicenceNumber(Name name, Calendar date){
		this.name = name;
		this.date = date;
		serialNumber = getSerialNumber();
	}
	
/*	public LicenceNumber(String name, String year, String number){
		
	}*/
	
	public int getSerialNumber(){
		Random randomGenerater = new Random();
		return randomGenerater.nextInt(100);
	}
	
	public Name getName(){
		return name;
	}
	
	public Calendar date(){
		return date;
	}
	
	public int serialNumber(){
		return serialNumber;
	}
	
/*	public String toString(){
		
	}*/
	
//	public static LicenceNumber valueOf(String number) {
//		final String[] parts = number.split("-");
//		return new LicenceNumber(parts[0], new Calendar(Integer.parseInt(parts[1]), 0), parts[2]);
//	    }
	
	
}
